home *** CD-ROM | disk | FTP | other *** search
- Path: mac007016.shef.ac.uk!user
- From: m.b.greenwood@sheffield.ac.uk (Mike Greenwood)
- Newsgroups: comp.lang.c
- Subject: Re: Kind of an annoying question...
- Date: Fri, 15 Mar 1996 13:12:51 +0000
- Organization: University of Sheffield
- Message-ID: <m.b.greenwood-1503961312510001@mac007016.shef.ac.uk>
- References: <4hvrio$c4k@lastactionhero.rs.itd.umich.edu> <4iaqd4$l70@cs3.brookes.ac.uk>
- NNTP-Posting-Host: mac007016.shef.ac.uk
-
- In short, unbuffered keyboard input:
-
- >
- > int main(void)
- > {
- > char choice;
- > printf("Do you want to drop an H-Bomb on Iraq (Y or N)");
- > choice=getch(); /* vital line */
- > if(choice=='Y') start_war();
-
- blah blah..
-
-
- > Krunchie
- > Digital Dynamics - Dynamic Software solutions for a dynamic world.
- > 95155580@brookes.ac.uk
-
- Hi
-
- ALERT ALERT ALERT !!!!
-
- Fine if it works, but getch() is _NOT_ ansi standard. Beware UNIX users,
- it's not as simple as all this. See the UNIX FAQ for a cheat way round
- this, but I still haven't managed to figure it out the 'proper way'.
-
- Regards
-
- Mike Greenwood :o)
-